package org.wang.generalcode.modules.exam.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.wang.generalcode.modules.exam.converter.SubjectInfoConverter;
import org.wang.generalcode.modules.exam.mapper.SubjectInfoMapper;
import org.wang.generalcode.modules.exam.pojo.entity.SubjectInfoEntity;
import org.wang.generalcode.modules.exam.pojo.param.SubjectInfoParams;
import org.wang.generalcode.modules.exam.pojo.vo.SubjectInfoVO;
import org.wang.generalcode.modules.exam.service.SubjectInfoService;
import org.wang.generalcode.support.base.BaseServiceImpl;

import java.util.List;

/**
 * 科目表服务实现类
 *
 * @author wz
 * @since 2024-11-22
 */
@Service
@RequiredArgsConstructor
public class SubjectInfoServiceImpl extends BaseServiceImpl<SubjectInfoMapper, SubjectInfoEntity> implements SubjectInfoService {

    private final SubjectInfoConverter subjectinfoConverter;

    /**
     * 获取科目表分页列表
     *
     * @param queryParams 查询参数
     * @return {@link IPage<SubjectInfoVO>} 科目表分页列表
     */
    @Override
    public IPage<SubjectInfoVO> getSubjectInfoPage(IPage<SubjectInfoVO> page, SubjectInfoParams queryParams) {
        return page.setRecords(baseMapper.getSubjectInfoPage(page, queryParams));
    }

    @Override
    public List<SubjectInfoVO> getSubjectInfoList(SubjectInfoParams queryParams) {
        return baseMapper.getSubjectInfoList(queryParams);
    }
}
